<?php


namespace App\Model;


/**
 * App\Model\WeappToken
 *
 * @property int $id
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property string $token 令牌值
 * @property int $user_id 用户id
 * @property int $expire_time 过期时间
 * @property int $type 类型,1是微信小程序,2是h5
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereExpireTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereToken($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\WeappToken whereUserId($value)
 * @mixin \Eloquent
 * @property-read \App\Model\User $user
 */
class WeappToken extends Base
{

    protected $table='weapp_token';

    protected $fillable=['token','user_id','expire_time','type'];


    function user(){

        return $this->belongsTo(User::class,'user_id','id');
    }


}
